#!/bin/bash

export PATH=/opt/demo:/opt/demo/libs:/opt/demo/libs/common:/opt/demo/libs/common/ffmpeg:/opt/demo/libs/common/ffmpeg/extend:$PATH
export LD_LIBRARY_PATH=/opt/demo:/opt/demo/libs:/opt/demo/libs/common:/opt/demo/libs/common/ffmpeg:/opt/demo/libs/common/ffmpeg/extend:$LD_LIBRARY_PATH


# start 1
ffmpeg -v info -re  -stream_loop -1 -probesize 409600 -fpsprobesize 1  -fflags nobuffer -i rtmp://58.200.131.2:1935/livetv/gxtv -y -c:v copy  -bsf:v h264_mp4toannexb,dump_extra -map 0:v:0  -f  tee [select=v:f=rtp:ssrc=24591037:payload_type=100]rtp://127.0.0.1:60001  > /var/log/ffmpeg.log 2>&1 &
# start 2
hi_rtp_demo > /var/log/hi_rtp_demo.log 2>&1 &
 
# just keep this script running
while [[ true ]]; do
    sleep 1
done